<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HealthHub - 健康社区</title>
    <!-- Tailwind CSS CDN -->
    <script src="https://cdn.tailwindcss.com"></script>
    <!-- 配置Tailwind主题 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#4F46E5',
                        secondary: '#10B981',
                        accent: '#F59E0B',
                        dark: '#1F2937',
                        light: '#F9FAFB'
                    },
                    fontFamily: {
                        sans: ['Inter', 'system-ui', 'sans-serif']
                    }
                }
            }
        }
    </script>
    <!-- 引入一些字体 -->
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <!-- 图标库 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body class="bg-gray-50 text-gray-800 font-sans">
    <!-- 主容器 - 模拟手机屏幕 -->
    <div class="max-w-md mx-auto bg-white min-h-screen shadow-lg overflow-hidden pb-20">
        <!-- 顶部状态栏 -->
        <div class="bg-primary text-white p-4 flex justify-between items-center">
            <div class="flex items-center">
                <span class="font-bold text-xl">健康社区</span>
            </div>
            <div class="flex items-center space-x-3">
                <i class="fas fa-search"></i>
                <i class="fas fa-bell"></i>
                <div class="w-8 h-8 rounded-full bg-gray-300 overflow-hidden">
                    <img src="https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&w=100&h=100" 
                         alt="用户头像" class="w-full h-full object-cover">
                </div>
            </div>
        </div>

        <!-- 社区导航标签页 -->
        <div class="px-4 pt-4">
            <div class="flex overflow-x-auto space-x-3 pb-2 border-b border-gray-100">
                <button class="px-4 py-2 text-sm font-medium text-primary border-b-2 border-primary whitespace-nowrap">全部动态</button>
                <button class="px-4 py-2 text-sm font-medium text-gray-500 whitespace-nowrap">挑战活动</button>
                <button class="px-4 py-2 text-sm font-medium text-gray-500 whitespace-nowrap">达人分享</button>
                <button class="px-4 py-2 text-sm font-medium text-gray-500 whitespace-nowrap">我的关注</button>
                <button class="px-4 py-2 text-sm font-medium text-gray-500 whitespace-nowrap">附近</button>
            </div>
        </div>

        <!-- 热门挑战活动轮播 -->
        <div class="p-4">
            <div class="relative overflow-hidden rounded-xl h-40 mb-6">
                <div class="absolute inset-0 bg-gradient-to-r from-primary to-indigo-600 opacity-90 z-10"></div>
                <img src="https://images.unsplash.com/photo-1552674605-db6ffd4facb5?auto=format&fit=crop&w=800" 
                     alt="健身挑战" class="absolute inset-0 h-full w-full object-cover">
                <div class="relative z-20 p-4 text-white h-full flex flex-col justify-between">
                    <div>
                        <span class="inline-block px-2 py-1 bg-white/20 rounded-full text-xs">热门挑战</span>
                        <h3 class="text-xl font-bold mt-2">春季健身21天挑战</h3>
                        <p class="text-sm opacity-90 mt-1">每日坚持，改变从现在开始</p>
                    </div>
                    <div class="flex justify-between items-center">
                        <div class="flex items-center">
                            <div class="flex -space-x-2">
                                <div class="w-6 h-6 rounded-full border-2 border-white bg-gray-200 overflow-hidden">
                                    <img src="https://images.unsplash.com/photo-1531123897727-8f129e1688ce?auto=format&fit=crop&w=100" alt="用户头像" class="w-full h-full object-cover">
                                </div>
                                <div class="w-6 h-6 rounded-full border-2 border-white bg-gray-200 overflow-hidden">
                                    <img src="https://images.unsplash.com/photo-1517841905240-472988babdf9?auto=format&fit=crop&w=100" alt="用户头像" class="w-full h-full object-cover">
                                </div>
                                <div class="w-6 h-6 rounded-full border-2 border-white bg-gray-200 overflow-hidden">
                                    <img src="https://images.unsplash.com/photo-1539571696357-5a69c17a67c6?auto=format&fit=crop&w=100" alt="用户头像" class="w-full h-full object-cover">
                                </div>
                            </div>
                            <span class="text-xs ml-1">6,280人参与</span>
                        </div>
                        <button class="px-3 py-1 bg-white text-primary rounded-full text-xs font-medium">参与挑战</button>
                    </div>
                </div>
                <!-- 指示器 -->
                <div class="absolute bottom-2 left-0 right-0 flex justify-center space-x-1 z-20">
                    <div class="w-2 h-2 rounded-full bg-white"></div>
                    <div class="w-2 h-2 rounded-full bg-white/40"></div>
                    <div class="w-2 h-2 rounded-full bg-white/40"></div>
                </div>
            </div>

            <!-- 快速滚动分类 -->
            <div class="flex overflow-x-auto space-x-4 pb-2 mb-5">
                <div class="flex-shrink-0 flex flex-col items-center justify-center">
                    <div class="w-16 h-16 rounded-full bg-blue-100 flex items-center justify-center">
                        <i class="fas fa-person-running text-blue-500 text-xl"></i>
                    </div>
                    <span class="text-xs mt-1">跑步</span>
                </div>
                <div class="flex-shrink-0 flex flex-col items-center justify-center">
                    <div class="w-16 h-16 rounded-full bg-green-100 flex items-center justify-center">
                        <i class="fas fa-weight-scale text-green-500 text-xl"></i>
                    </div>
                    <span class="text-xs mt-1">减重</span>
                </div>
                <div class="flex-shrink-0 flex flex-col items-center justify-center">
                    <div class="w-16 h-16 rounded-full bg-purple-100 flex items-center justify-center">
                        <i class="fas fa-apple-whole text-purple-500 text-xl"></i>
                    </div>
                    <span class="text-xs mt-1">饮食</span>
                </div>
                <div class="flex-shrink-0 flex flex-col items-center justify-center">
                    <div class="w-16 h-16 rounded-full bg-yellow-100 flex items-center justify-center">
                        <i class="fas fa-dumbbell text-yellow-500 text-xl"></i>
                    </div>
                    <span class="text-xs mt-1">健身</span>
                </div>
                <div class="flex-shrink-0 flex flex-col items-center justify-center">
                    <div class="w-16 h-16 rounded-full bg-red-100 flex items-center justify-center">
                        <i class="fas fa-heart text-red-500 text-xl"></i>
                    </div>
                    <span class="text-xs mt-1">心理</span>
                </div>
                <div class="flex-shrink-0 flex flex-col items-center justify-center">
                    <div class="w-16 h-16 rounded-full bg-indigo-100 flex items-center justify-center">
                        <i class="fas fa-moon text-indigo-500 text-xl"></i>
                    </div>
                    <span class="text-xs mt-1">睡眠</span>
                </div>
            </div>

            <!-- 社区动态内容 -->
            <div class="space-y-5">
                <!-- 动态贴1 -->
                <div class="bg-white rounded-xl border border-gray-100 shadow-sm overflow-hidden">
                    <!-- 用户信息 -->
                    <div class="p-4 flex items-center justify-between">
                        <div class="flex items-center">
                            <div class="w-10 h-10 rounded-full bg-gray-200 overflow-hidden mr-3">
                                <img src="https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&w=200" 
                                     alt="用户头像" class="w-full h-full object-cover">
                            </div>
                            <div>
                                <div class="flex items-center">
                                    <h3 class="font-medium">李健康</h3>
                                    <div class="ml-2 px-1.5 py-0.5 bg-blue-100 text-blue-600 text-xs rounded">跑步达人</div>
                                </div>
                                <p class="text-xs text-gray-500">2小时前</p>
                            </div>
                        </div>
                        <button class="text-gray-400">
                            <i class="fas fa-ellipsis-vertical"></i>
                        </button>
                    </div>
                    <!-- 动态内容 -->
                    <div class="px-4 pb-3">
                        <p class="text-sm mb-3">今天完成了10公里的晨跑，感觉状态越来越好了！分享一下我的跑步心得：坚持比速度更重要，慢慢来，每天进步一点点。#晨跑打卡 #健康生活</p>
                        <!-- 图片内容 -->
                        <div class="grid grid-cols-2 gap-2 mb-3">
                            <div class="h-32 rounded-lg overflow-hidden">
                                <img src="https://images.unsplash.com/photo-1461897104016-0b3b00cc81ee?auto=format&fit=crop&w=400" 
                                     alt="跑步图片" class="w-full h-full object-cover">
                            </div>
                            <div class="h-32 rounded-lg overflow-hidden">
                                <img src="https://images.unsplash.com/photo-1530549387789-4c1017266635?auto=format&fit=crop&w=400" 
                                     alt="跑步记录" class="w-full h-full object-cover">
                            </div>
                        </div>
                        <!-- 数据卡片 -->
                        <div class="bg-gray-50 rounded-lg p-3 flex justify-between mb-3">
                            <div class="text-center">
                                <p class="text-sm font-medium">10.2</p>
                                <p class="text-xs text-gray-500">公里</p>
                            </div>
                            <div class="text-center">
                                <p class="text-sm font-medium">58:20</p>
                                <p class="text-xs text-gray-500">时间</p>
                            </div>
                            <div class="text-center">
                                <p class="text-sm font-medium">5'42"</p>
                                <p class="text-xs text-gray-500">配速</p>
                            </div>
                            <div class="text-center">
                                <p class="text-sm font-medium">486</p>
                                <p class="text-xs text-gray-500">卡路里</p>
                            </div>
                        </div>
                        <!-- 互动按钮 -->
                        <div class="flex justify-between border-t border-gray-100 pt-3">
                            <button class="flex items-center text-gray-500 text-sm">
                                <i class="far fa-heart mr-1"></i>
                                <span>128</span>
                            </button>
                            <button class="flex items-center text-gray-500 text-sm">
                                <i class="far fa-comment mr-1"></i>
                                <span>36</span>
                            </button>
                            <button class="flex items-center text-gray-500 text-sm">
                                <i class="far fa-bookmark mr-1"></i>
                                <span>收藏</span>
                            </button>
                            <button class="flex items-center text-gray-500 text-sm">
                                <i class="far fa-share-from-square mr-1"></i>
                                <span>分享</span>
                            </button>
                        </div>
                    </div>
                </div>

                <!-- 动态贴2 -->
                <div class="bg-white rounded-xl border border-gray-100 shadow-sm overflow-hidden">
                    <!-- 用户信息 -->
                    <div class="p-4 flex items-center justify-between">
                        <div class="flex items-center">
                            <div class="w-10 h-10 rounded-full bg-gray-200 overflow-hidden mr-3">
                                <img src="https://images.unsplash.com/photo-1517841905240-472988babdf9?auto=format&fit=crop&w=200" 
                                     alt="用户头像" class="w-full h-full object-cover">
                            </div>
                            <div>
                                <div class="flex items-center">
                                    <h3 class="font-medium">营养师小王</h3>
                                    <div class="ml-2 px-1.5 py-0.5 bg-green-100 text-green-600 text-xs rounded">认证营养师</div>
                                </div>
                                <p class="text-xs text-gray-500">昨天</p>
                            </div>
                        </div>
                        <button class="text-gray-400">
                            <i class="fas fa-ellipsis-vertical"></i>
                        </button>
                    </div>
                    <!-- 动态内容 -->
                    <div class="px-4 pb-3">
                        <p class="text-sm mb-3">【每日营养小知识】很多人问我，早餐应该吃什么最健康？我的建议是：1. 优质蛋白，如鸡蛋、酸奶；2. 复合碳水，如全麦面包、燕麦；3. 健康脂肪，如牛油果、坚果；4. 新鲜水果提供维生素和膳食纤维。#健康饮食 #营养早餐</p>
                        <!-- 图片内容 -->
                        <div class="rounded-lg overflow-hidden mb-3">
                            <img src="https://images.unsplash.com/photo-1494859802809-d069c3b71a8a?auto=format&fit=crop&w=800" 
                                 alt="健康早餐" class="w-full h-48 object-cover">
                        </div>
                        <!-- 互动按钮 -->
                        <div class="flex justify-between border-t border-gray-100 pt-3">
                            <button class="flex items-center text-gray-500 text-sm">
                                <i class="fas fa-heart mr-1 text-red-500"></i>
                                <span>256</span>
                            </button>
                            <button class="flex items-center text-gray-500 text-sm">
                                <i class="far fa-comment mr-1"></i>
                                <span>72</span>
                            </button>
                            <button class="flex items-center text-gray-500 text-sm">
                                <i class="far fa-bookmark mr-1"></i>
                                <span>收藏</span>
                            </button>
                            <button class="flex items-center text-gray-500 text-sm">
                                <i class="far fa-share-from-square mr-1"></i>
                                <span>分享</span>
                            </button>
                        </div>
                        <!-- 评论预览 -->
                        <div class="mt-3 pt-3 border-t border-gray-100">
                            <div class="flex mb-2">
                                <div class="w-7 h-7 rounded-full bg-gray-200 overflow-hidden mr-2 flex-shrink-0">
                                    <img src="https://images.unsplash.com/photo-1539571696357-5a69c17a67c6?auto=format&fit=crop&w=100" 
                                         alt="评论用户头像" class="w-full h-full object-cover">
                                </div>
                                <div>
                                    <div class="flex items-center">
                                        <span class="text-xs font-medium">健康达人</span>
                                        <span class="text-xs text-gray-400 ml-2">1小时前</span>
                                    </div>
                                    <p class="text-sm">这个搭配太棒了！我最近就在尝试改善早餐，感觉精力确实好了很多。</p>
                                </div>
                            </div>
                            <button class="text-xs text-primary">查看全部72条评论</button>
                        </div>
                    </div>
                </div>

                <!-- 动态贴3 - 健康挑战 -->
                <div class="bg-white rounded-xl border border-gray-100 shadow-sm overflow-hidden">
                    <!-- 挑战信息 -->
                    <div class="p-4 bg-gradient-to-r from-primary/10 to-indigo-500/10">
                        <div class="flex items-center justify-between">
                            <div class="flex items-center">
                                <div class="w-10 h-10 rounded-full bg-primary/20 flex items-center justify-center mr-3">
                                    <i class="fas fa-trophy text-primary"></i>
                                </div>
                                <div>
                                    <div class="flex items-center">
                                        <h3 class="font-medium">每日一万步挑战</h3>
                                        <div class="ml-2 px-1.5 py-0.5 bg-primary/20 text-primary text-xs rounded">进行中</div>
                                    </div>
                                    <p class="text-xs text-gray-500">第5天/30天 · 8,362人参与</p>
                                </div>
                            </div>
                            <button class="px-3 py-1 bg-primary text-white text-xs rounded-full">
                                已参与
                            </button>
                        </div>
                        <!-- 进度条 -->
                        <div class="mt-3">
                            <div class="flex justify-between text-xs mb-1">
                                <span>今日进度: 7,245/10,000步</span>
                                <span>72%</span>
                            </div>
                            <div class="w-full bg-gray-200 rounded-full h-2">
                                <div class="bg-primary h-2 rounded-full" style="width: 72%"></div>
                            </div>
                        </div>
                    </div>
                    <!-- 挑战内容 -->
                    <div class="p-4">
                        <div class="flex justify-between mb-4">
                            <h4 class="font-medium">挑战排行榜</h4>
                            <button class="text-xs text-primary">查看全部</button>
                        </div>
                        <!-- 排行榜 -->
                        <div class="space-y-3">
                            <!-- 第一名 -->
                            <div class="flex items-center">
                                <div class="w-6 h-6 rounded-full bg-yellow-100 flex items-center justify-center text-xs font-bold text-yellow-600 mr-2">
                                    1
                                </div>
                                <div class="w-8 h-8 rounded-full bg-gray-200 overflow-hidden mx-2">
                                    <img src="https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?auto=format&fit=crop&w=100" 
                                         alt="用户头像" class="w-full h-full object-cover">
                                </div>
                                <div class="flex-1 mx-2">
                                    <p class="text-sm font-medium">王健康</p>
                                    <p class="text-xs text-gray-500">连续30天达标</p>
                                </div>
                                <div class="text-sm font-bold">15,628步</div>
                            </div>
                            <!-- 第二名 -->
                            <div class="flex items-center">
                                <div class="w-6 h-6 rounded-full bg-gray-100 flex items-center justify-center text-xs font-bold text-gray-600 mr-2">
                                    2
                                </div>
                                <div class="w-8 h-8 rounded-full bg-gray-200 overflow-hidden mx-2">
                                    <img src="https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&w=100" 
                                         alt="用户头像" class="w-full h-full object-cover">
                                </div>
                                <div class="flex-1 mx-2">
                                    <p class="text-sm font-medium">李健康</p>
                                    <p class="text-xs text-gray-500">连续28天达标</p>
                                </div>
                                <div class="text-sm font-bold">14,852步</div>
                            </div>
                            <!-- 第三名 -->
                            <div class="flex items-center">
                                <div class="w-6 h-6 rounded-full bg-orange-100 flex items-center justify-center text-xs font-bold text-orange-600 mr-2">
                                    3
                                </div>
                                <div class="w-8 h-8 rounded-full bg-gray-200 overflow-hidden mx-2">
                                    <img src="https://images.unsplash.com/photo-1517841905240-472988babdf9?auto=format&fit=crop&w=100" 
                                         alt="用户头像" class="w-full h-full object-cover">
                                </div>
                                <div class="flex-1 mx-2">
                                    <p class="text-sm font-medium">张健康</p>
                                    <p class="text-xs text-gray-500">连续25天达标</p>
                                </div>
                                <div class="text-sm font-bold">13,740步</div>
                            </div>
                            <!-- 我的排名 -->
                            <div class="flex items-center bg-gray-50 p-2 rounded-lg">
                                <div class="w-6 h-6 rounded-full bg-primary flex items-center justify-center text-xs font-bold text-white mr-2">
                                    16
                                </div>
                                <div class="w-8 h-8 rounded-full bg-gray-200 overflow-hidden mx-2">
                                    <img src="https://images.unsplash.com/photo-1539571696357-5a69c17a67c6?auto=format&fit=crop&w=100" 
                                         alt="我的头像" class="w-full h-full object-cover">
                                </div>
                                <div class="flex-1 mx-2">
                                    <p class="text-sm font-medium">我</p>
                                    <p class="text-xs text-gray-500">连续15天达标</p>
                                </div>
                                <div class="text-sm font-bold">10,532步</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 底部导航栏 -->
        <div class="fixed bottom-0 left-0 right-0 max-w-md mx-auto bg-white border-t border-gray-200 px-6 py-2">
            <div class="flex justify-between items-center">
                <a href="health_app_home.html" class="flex flex-col items-center text-gray-400">
                    <i class="fas fa-home text-xl"></i>
                    <span class="text-xs mt-1">首页</span>
                </a>
                <a href="health_app_data.html" class="flex flex-col items-center text-gray-400">
                    <i class="fas fa-chart-line text-xl"></i>
                    <span class="text-xs mt-1">数据</span>
                </a>
                <div class="relative -mt-5">
                    <button class="w-14 h-14 rounded-full bg-gradient-to-r from-primary to-indigo-600 flex items-center justify-center shadow-lg text-white">
                        <i class="fas fa-plus text-xl"></i>
                    </button>
                </div>
                <a href="#" class="flex flex-col items-center text-primary">
                    <i class="fas fa-users text-xl"></i>
                    <span class="text-xs mt-1">社区</span>
                </a>
                <a href="#" class="flex flex-col items-center text-gray-400">
                    <i class="fas fa-user text-xl"></i>
                    <span class="text-xs mt-1">我的</span>
                </a>
            </div>
        </div>
    </div>
</body>
</html> 